package cn.cdutetc.foxwatch.config;//package org.yanhuohuo.config;

import cn.cdutetc.foxwatch.interceptors.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

//自定义springmvc
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private LoginInterceptor loginInterceptor;

    //    注册拦截器
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //登录和注册放行
<<<<<<< HEAD
        registry.addInterceptor(loginInterceptor).excludePathPatterns("/user/login", "/user/register");
    }
    
=======
        registry.addInterceptor(loginInterceptor).excludePathPatterns("/tripartite/email/*", "/tripartite/**", "/email/sendCode", "/user/login", "/user/register");
    }


>>>>>>> f0dd41dd48d79067fa2de22e427243c250479df2
}
